package com.kerrykidz.sms.dao.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.eclipse.jdt.internal.compiler.ast.SuperReference;

import com.rdp.framework.core.model.MyBatisSuperModel;

/**
 * 短信发送批次
 * @ClassName: SmsBatchEntity 
 * @description: 大致描述该类的用途，内容简短易懂 
 * @author: wolf-yansl 
 * @date: 2014年9月24日 下午5:31:33 
 * @version: V1.0
 *
 */
public class SmsBatchEntity extends MyBatisSuperModel{
	/*
	 * =1 草稿
		=2 递交
		=3已发送
		=4 删除
	 * */

	public static final String STATUS_CG="1";
	public static final String STATUS_TJ="2";
	public static final String STATUS_GB="3";
	public static final String STATUS_SC="4";
	
	/**
	 * 1 抽样条件
	 * 2 录入
	 * */
	public static final String SRCTYPE_CY="1";
	public static final String SRCTYPE_LR="2";
	
	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

	private String pkBatchId;
	private String fkSmscontId;
	private String status;
	private Date planTime;
	private String planTimeStr;
	private String srcType;
	private String fkBranId;
	private String modiBy;
	private Date modiTime;
	
	private String startDate;
	private String startDates;
	private String endDate;
	private String endDates;
	private String context;//发送短信内容
	private String branName;
	private String sendResult;//发送结果
	private String destPhone;//发送手机号码
	private String sendTime;
	private String pkSmsId;//短信ID
	
	
	
	
	private List<String> phoneList;//手工录入手机号码集合
	private List<SmsBatchCondEntity> condList ; 
	public String getPkBatchId() {
		return pkBatchId;
	}
	public void setPkBatchId(String pkBatchId) {
		this.pkBatchId = pkBatchId;
	}
	public String getFkSmscontId() {
		return fkSmscontId;
	}
	public void setFkSmscontId(String fkSmscontId) {
		this.fkSmscontId = fkSmscontId;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public Date getPlanTime() {
		return planTime;
	}
	public void setPlanTime(Date planTime) {
		this.planTime = planTime;
	}
	
	public String getSrcType() {
		return srcType;
	}
	public void setSrcType(String srcType) {
		this.srcType = srcType;
	}
	public String getFkBranId() {
		return fkBranId;
	}
	public void setFkBranId(String fkBranId) {
		this.fkBranId = fkBranId;
	}
	public String getModiBy() {
		return modiBy;
	}
	public void setModiBy(String modiBy) {
		this.modiBy = modiBy;
	}
	public Date getModiTime() {
		return modiTime;
	}
	public void setModiTime(Date modiTime) {
		this.modiTime = modiTime;
	}
	public String getStartDate() {
		return startDate;
	}
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}
	public String getEndDate() {
		return endDate;
	}
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	public String getContext() {
		return context;
	}
	public void setContext(String context) {
		this.context = context;
	}
	public String getBranName() {
		return branName;
	}
	public void setBranName(String branName) {
		this.branName = branName;
	}
	public String getPlanTimeStr() {
		if(this.planTime != null){
			return sdf.format(this.planTime);
		}
		return null;
	}
	public void setPlanTimeStr(String planTimeStr) throws Exception {
		if(StringUtils.isNotBlank(planTimeStr)){
			this.planTime  = sdf.parse(planTimeStr);
		}
		
	}
	public List<String> getPhoneList() {
		return phoneList;
	}
	public void setPhoneList(List<String> phoneList) {
		this.phoneList = phoneList;
	}
	public List<SmsBatchCondEntity> getCondList() {
		return condList;
	}
	public void setCondList(List<SmsBatchCondEntity> condList) {
		this.condList = condList;
	}
	public String getSendResult() {
		return sendResult;
	}
	public void setSendResult(String sendResult) {
		this.sendResult = sendResult;
	}
	public String getDestPhone() {
		return destPhone;
	}
	public void setDestPhone(String destPhone) {
		this.destPhone = destPhone;
	}
	public String getSendTime() {
		return sendTime;
	}
	public void setSendTime(String sendTime) {
		this.sendTime = sendTime;
	}
	public String getPkSmsId() {
		return pkSmsId;
	}
	public void setPkSmsId(String pkSmsId) {
		this.pkSmsId = pkSmsId;
	}
	public String getStartDates() {
		return startDates;
	}
	public void setStartDates(String startDates) {
		if(StringUtils.isNotBlank(startDates)){
			this.startDate = startDates+" 00:00:00";
		}
		
	}
	public String getEndDates() {
		return endDates;
	}
	public void setEndDates(String endDates) {
		if(StringUtils.isNotBlank(endDates)){
			this.endDate = endDates+" 23:59:59";
		}
		
	}
	
	
	
	
}
